home *** CD-ROM | disk | FTP | other *** search
- Path: escape.com!viking
- From: viking@escape.com (Ken Nahshon)
- Newsgroups: comp.lang.pascal.misc,comp.lang.c++,comp.lang.c,comp.lang.pascal.borland
- Subject: Re: Tough FACTORIAL math problem...
- Followup-To: comp.lang.pascal.misc,comp.lang.c++,comp.lang.c,comp.lang.pascal.borland
- Date: 19 Feb 1996 22:42:31 GMT
- Organization: Escape.Com Internet Access and Services
- Message-ID: <4gaucn$cdu@beyond.escape.com>
- References: <4fr8be$ass@news.iconn.net> <4fv74c$chq@gatekeeper.alcatel.no> <93bb.5.00122006@eng.cam.ac.uk> <4g063l$a3l@stc06.ctd.ornl.gov> <4g2n5u$kqj@sun001.spd.dsccc.com> <danpop.824595562@rscernix>
- NNTP-Posting-Host: escape.escape.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Who origianlly asked about this problem...?
- This person is obviousely a serious loser because this was one of the
- qualifying round problems for the United States of America Computing
- Olypiad(USACO). The problem is EXTREMELY simple. All that must be done
- is remove all the trailing zeros after each iteration and (the way I did
- it) minus 10000 from the total if the total is greater than 10000.
- Another, cleaner solution is to use the modulus operator.
-
- ps I did this, and speak from expierience. MINE WORKS! :)
-